package com.ylfstu.codeblock_;

public class CodeBlockDetail {
    public static void main(String[] args) {
        new BBB("joy");
    }
}

class AAA {
    private String name;

    public AAA(String name) {
        //1.super()
        //2.调用普通代码块
        this.name = name;
        System.out.println("AAA.name=" + this.name);
        System.out.println("AAA的构造器...");
    }

    {
        System.out.println("AAA的普通代码块...");
    }
}

class BBB extends AAA {

    {
        System.out.println("BBB的普通代码块...");
    }

    public BBB(String name) {
        //1.super();
        //2.调用本类的普通代码块
        super(name);
        System.out.println("BBB的构造器...");
    }
}
